﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;

namespace DemoWcfService
{
    // NOTE: If you change the interface name "IService1" here, you must also update the reference to "IService1" in Web.config.
    [ServiceContract]
    public interface IAccountService
    {

        [OperationContract]
        string Login(LoginDetail login);

        [OperationContract]
        LoginDetail GetLoginDetail(UserEnquiry enquiry);

    }


    [DataContract]
    public class UserEnquiry
    {
        [DataMember]
        public string UserName { get; set; }

        [DataMember]
        public string EmailID { get; set; }
    }

    [DataContract]
    public class UserSummery : UserEnquiry
    {
        [DataMember]
        public string UserID { get; set; }
    }

    [DataContract]
    public class UserDetail : UserSummery
    {
        bool _active = true;
        string _address = string.Empty;

        [DataMember]
        public bool Active
        {
            get { return _active; }
            set { _active = value; }
        }

        [DataMember]
        public string Address
        {
            get { return _address; }
            set { _address = value; }
        }
    }

    [DataContract]
    public class LoginDetail : UserDetail
    {
        [DataMember]
        public string Password { get; set; }
    }

}
